package ysu.sxm.ptjc.Service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import ysu.sxm.ptjc.Dao.DefectQueryMapper;
import ysu.sxm.ptjc.Dao.UserMapper;
import ysu.sxm.ptjc.Service.DefectQueryService;
import ysu.sxm.ptjc.Service.UserService;
import ysu.sxm.ptjc.pojo.DefectQueryInfo;
import ysu.sxm.ptjc.pojo.UserInfo;

import java.util.List;

@Service
public class DefectQueryServiceImpl extends ServiceImpl<DefectQueryMapper, DefectQueryInfo> implements DefectQueryService {

    @Override
    public DefectQueryInfo findOneByDefectNum(String querynum) {
        QueryWrapper<DefectQueryInfo> wrapper = new QueryWrapper<>();
        //根据用户名查询用户对象
        int result=0;
        wrapper.eq("defect_num",querynum);
        return this.getOne(wrapper);

    }

    @Override
    public List<DefectQueryInfo> getall() {
        return this.list();
    }
}
